import React from 'react';

function RefHooks() {

    const myRef = React.useRef()

    function show(){
        console.log(myRef.current.value);
    }

    return(
        <div>
            <input type="text" ref={myRef}/>
            <button onClick={show}>show</button>
        </div>
    )
}

export default RefHooks;